﻿using NetProtocol.POD;

namespace IQIGame.Onigao.GamePlay
{
    public class DynLevelItem
    {
        public long id { private set; get; }
        /// <summary>
        /// item配置id
        /// </summary>
        public int cid { private set; get; }
        /// <summary>
        /// 数量
        /// </summary>
        public int num { private set; get; }
        /// <summary>
        /// 已使用数量
        /// </summary>
        public int usedNum { private set; get; }
        /// <summary>
        /// 创建时间
        /// </summary>
        public long createTime { private set; get; }

        private DynLevelItem()
        {

        }

        public virtual void InitByPOD(ItemPOD pod)
        {
            this.id = pod.id;
            this.cid = pod.cid;
            this.usedNum = pod.usedNum;
            this.createTime = pod.createTime;
        }

        public static DynLevelItem Create(ItemPOD pod)
        {
            DynLevelItem levelItem = new DynLevelItem();
            levelItem.InitByPOD(pod);
            return levelItem;
        }

    }
}
